import React, { useState } from 'react'
import { Toast, NavBar, Cell } from 'react-vant';
import { MoreOutlined } from '@ant-design/icons'
import { Button, Flex, Input } from 'antd';
import { Outlet, useNavigate } from 'react-router-dom';
import axios from "../../axios";
const { TextArea } = Input;
export default function Sao() {
  const navigate = useNavigate();
  const publicBook = async () => {
    let { data } = await axios.post("/add?");
    console.log(data);
  };

  return (
    <div>
      <NavBar
        title="发布"
        leftText=""
        rightText={<MoreOutlined style={{ fontSize: "20px" }} />}
        onClickLeft={() => {
          navigate(-1);
        }}
        onClickRight={() => Toast("按钮")}
      />
      <Outlet></Outlet>
      <Button
        style={{
          background: "green",
          color: "#fff",
          width: "98%",
          marginLeft: "1%",
          position: "fixed",
          bottom: "20px",
          height: "50px",
        }}
        onClick={() => {
          publicBook();
        }}
      >
        确认发布
      </Button>

      <Outlet></Outlet>
      <Button
        style={{
          background: "green",
          color: "#fff",
          width: "98%",
          marginLeft: "1%",
          position: "fixed",
          bottom: "20px",
          height: "50px",
        }}
      >
        确认发布
      </Button>
    </div>
  );
}
